<template>
  <view class="background">
    <view class="container" v-for="(item,index) in noticeArr" :key="index">
      <view class="top-section">
        <view class="title">{{ item.title }}</view>
        <button class="button">安排</button>
      </view>
    </view>
  </view>
</template>

<script >
export default {
  data() {
    return {
      noticeArr: [{
        title: '高等数学1',
      },
        {
          title: '高等数学2',
        },
        {
          title: '数据结构与算法',
        },
        {
          title: '线性代数',
        },

      ],

    }
  },
  onLoad() {

  },
  methods: {

  }
}
</script>
<style >
.background {
  height: 100vh; /* 使背景占满整个视口高度 */
  width: 100%;
  background: white;
  flex-direction: column; /* 使子元素垂直排列 */
  display: flex;
  align-items: center; /* 垂直居中 */
}


.container {
  border: 1px solid #cccccc;
  border-radius: 10px;
  display: flex;
  flex-direction: column; /* 垂直排列子元素 */
  width: 90%;
  height: 40px; /* 调整高度以适应内容 */
  padding: 10px; /* 可选：添加内边距 */
  margin-top: 10px;
}

.top-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.title {
  flex: 1;
  text-align: left;
  font-weight: bold;
  font-size: 16px;
  margin-right: 10px;
}


.button {
  border: 0;
  background-color: #39dc14;
  color: black;
  width: 150rpx;
  font-size: 14px;
}
</style>